package com.example.fittrack.mapper;



import com.example.fittrack.domain.bo.BasicInfoBo;
import com.example.fittrack.domain.bo.QueryBasicInfoBo;
import com.example.fittrack.domain.vo.BasicInfoVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BasicInfoMapper {


    @Insert("insert into t_basic_info (id,employeeName,employeeNo,employeeType,phone,birthDate,sex,grade,createTime,userId)" +
            " values (#{id},#{employeeName},#{employeeNo},#{employeeType},#{phone},#{birthDate},#{sex},#{grade},#{createTime},#{userId})")
    void insert(BasicInfoBo po);

    List<BasicInfoVo> listParam(QueryBasicInfoBo bo);

    BasicInfoVo queryByEmployeeNo(@Param("employeeNo") String employeeNo);
    BasicInfoVo queryByEmployee(@Param("phone") String phone,
                                @Param("employeeName") String employeeName);

    void deleteArchive(@Param("id") Long id);
}
